package com.hoongs.v1.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hoongs.v1.utils.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Repository
@TableName(value = "tag")
public class Tag {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @TableField(value = "parent_id")
    private String parentId = "0";
    private String title;
    private String summary;
    private String icon;
    private int num = 0;
    private String level = "1";
    private String status = "1";
    private String color;
    private String remark;

    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}
